forEach

open override fun forEach(action: (Nothing) -> Unit)

Runs action if this is a Success. Returns Unit without any action if this is a Failure.

Parameters

action

Action to be run on a value of a Success.